@extends('admin')

@section('content')

    <div class="nav">
        <ul class="cc">
            <li>
                <a href="{{url('admin/stores')}}">商家管理</a>
            </li>
            <li class="current">
                <a href="{{url('admin/receipt')}}">收单数据</a>
            </li>
        </ul>
    </div>

    <p class="mb10">
        <a href="{{url('admin/receipt/import')}}" class="btn J_dialog" title="导入POS收单数据"><span class="add"></span>数据导入</a>
    </p>

    <div class="h_a">搜索</div>
    <div class="search_type cc mb10">
        <form action="{{url('admin/receipt')}}" method="get" class="search_form">
            <label for="search_store_sn">商户编号：</label><input type="text" name="store_sn" value="{{$store_sn}}" id="search_store_sn" class="input length_2 mr10"/>
            <label for="search_pay_sn">流水号：</label><input type="text" name="pay_sn" value="{{$pay_sn}}" id="search_pay_sn" class="input length_2 mr10"/>
            <label for="search_pay_date">收款日期：</label><input type="text" name="pay_date" value="{{$pay_date}}" id="search_pay_date" class="input length_2 mr10 J_date"/>
            <button type="submit" class="btn">提交查询</button>
        </form>
    </div>

    <div class="table_list">
        <div id="data_list">
            <table class="items">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>商户编号</th>
                    <th>日期</th>
                    <th style="text-align: right">交易金额</th>
                    <th>流水号</th>
                    <th>状态</th>
                </tr>
                </thead>
                <tbody>
                @foreach ($list as $item)
                    <tr>
                        <td>{{$item->id}}</td>
                        <td>{{$item->store_sn}}</td>
                        <td>{{$item->pay_time}}</td>
                        <td style="text-align: right">{{$item->money}}</td>
                        <td>{{$item->pay_sn}}</td>
                        <td>@if ($item->status == 1) <span class="green">已结算</span> @else <span class="red">未结算</span> @endif</td>
                    </tr>
                @endforeach
                </tbody>
            </table>
        </div>

        <div class="summary">
            共有 {{$list->total()}} 条数据
        </div>
        @if ($list->hasPages())
            <div class="pager">
                {!! $list->appends($appends)->render() !!}
            </div>
        @endif
    </div>

@stop